package com.itheima.project.feign;

import com.itheima.project.basic.ResponseWrap;
import com.itheima.project.hystrix.CreditPayHystrix;
import com.itheima.project.vo.trade.TradingVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @ClassName CreditPayFace.java
 * @Description 信用支付方式：免单、挂账
 */
@FeignClient(value = "module-trade-web",fallback = CreditPayHystrix.class )
public interface CreditPayFeign {


    /***
     * @description 免单：商户对用户免单
     * @param tradingVo 交易单
     * @return  交易单
     */
    @PostMapping("trade-credit/create-cash-trading")
    ResponseWrap<TradingVo> createCreditMdTrading(TradingVo tradingVo);

    /***
     * @description 挂账：用户挂账
     * @param tradingVo 交易单
     * @return  交易单
     */
    @PostMapping("trade-credit/create-cash-trading")
    ResponseWrap<TradingVo> createCreditGzTrading(TradingVo tradingVo);
}
